<?php

class Application_Model_Comment {

    private $id;
    private $date;
    private $content;
    private $author;

    function __construct() {
        $this->author = new Application_Model_People("", "");
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function getDate() {
        return $this->date;
    }

    public function setDate($date) {
        $this->date = $date;
    }

    public function getContent() {
        return $this->content;
    }

    public function setContent($content) {
        $this->content = $content;
    }

    public function getAuthor() {
        return $this->author;
    }

    public function setAuthor($author) {
        $this->author = $author;
    }

    public function toArray() {
        $tab = Array(
            "id" => $this->getId(),
            "author_firstname" => $this->getAuthor()->getFirstName(),
            "author_name" => $this->getAuthor()->getName(),
            "date" => $this->getDate(),
            "content" => $this->getContent()
        );

        return $tab;
    }

}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
